package com.tensquare.recruit.service;

import com.tensquare.recruit.dao.RecruitDao;
import com.tensquare.recruit.pojo.Recruit;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

/**
 * & ProjectName：  tensquare-parent
 * & PackageName:   com.tensquare.recruit.service
 * & Creation_Date： 2020/3/31 00:04
 * & Author：しの
 * ----------------------------------
 * & Description:
 */
@Service
public class RecruitService {
    @Autowired
    private RecruitDao recruitDao;
    //1 查询推荐职位列表
    public List<Recruit> recommend() {
        return recruitDao.findTop4ByStateOrderByCreatetimeDesc("1");
    }
    //2 查询最新职位
    public List<Recruit> newlist() {
        return recruitDao.findTop12ByStateNotOrderByCreatetimeDesc("0");
    }
}
